const fs = require('fs');

let route = {
    '/index':(res)=>{
        res.writeHead(200, {
            'Content-Type': 'text/html;charset=utf-8'
        });
        res.write(fs.readFileSync('./static/index.html', 'utf-8'));
    },
    '/login':(res)=>{
        res.writeHead(200, {
            'Content-Type': 'text/html;charset=utf-8'
        });
        res.write(fs.readFileSync('./static/login.html', 'utf-8'));
    },
    '/404':(res)=>{
        res.writeHead(404, {
            'Content-Type': 'text/html;charset=utf-8'
        });
        res.write(fs.readFileSync('./static/404.html', 'utf-8'));
    },
}

module.exports = route;